import request from '@/utils/request';

export function queryPatientPut(urlName, data) {
  return request({
    url: `${process.env.VUE_APP_PRIVATE_API}/patient/${urlName}`,
    method: 'put',
    data
  });
}
export function queryPatientDel(urlName, data) {
  return request({
    url: `${process.env.VUE_APP_PRIVATE_API}/patient/${urlName}`,
    method: 'DELETE',
    data
  });
}
export function queryDoctor(urlName, params) {
  return request({
    url: `${process.env.VUE_APP_AID_API}/doctor/${urlName}`,
    method: 'get',
    params
  });
}
export function queryPatient(urlName, params) {
  return request({
    url: `${process.env.VUE_APP_PRIVATE_API}/patient/${urlName}`,
    method: 'get',
    params
  });
}
export function queryOrg(urlName, params) {
  return request({
    url: `${process.env.VUE_APP_SALEAREA_API}/org/${urlName}`,
    method: 'get',
    params
  });
}

export function queryOper(urlName, params) {
  return request({
    url: `${process.env.VUE_APP_PRODUCT_API}/oper/${urlName}`,
    method: 'get',
    params
  });
}

export default { queryOper, queryPatient, queryOrg, queryDoctor, queryPatientPut };
